{include file='Public/header' /}
<script src="__PUBLIC__/Admin/jQuery/jQuery-2.2.0.min.js"></script>
<script src="__PUBLIC__/Admin/canvas/canvas.js"></script>
<body style="background:#1D2024;">
<canvas></canvas>
<div class="layui-fluid shu-layui-fluid" style="padding-left:5px;">
	<div class="layui-row">
		<div class="layui-col-xs12">
			<div class="loginmain">
				<div class="login0">
					<div class="login"><i class="fa fa-coffee"></i>{$Think.CONFIG.sitename}</div>
					<form class="layui-form" method="post">
						<div class="layui-form-item">
							<input type="text" name="user" required lay-verify="required" placeholder="请输入账号" autocomplete="off" class="layui-input">
						</div>
						<div class="layui-form-item">
							<input type="password" name="password" required lay-verify="required" placeholder="请输入密码" autocomplete="off" class="layui-input">
						</div>
						<div class="layui-form-item">
							<div class="layui-col-md6 layui-col-xs6">
								<input type="text" id="code" name="verify" required lay-verify="required" placeholder="验证码" autocomplete="off" class="layui-input">
							</div>
							<div class="layui-col-md6 layui-col-xs6">
								<div class="yzmt"><img class="yzm" style="cursor:pointer;" src="{:captcha_src()}" alt="captcha" title="看不清楚？点击刷新" onClick="this.src = '{:captcha_src()}?'+new Date().getTime()"></div>
							</div>
						</div>
						<div class="layui-form-item">
							<div class="layui-col-xs6 layui-col-md6">
								<input type="checkbox" name="remember" title="保持登录" lay-skin="primary">
							</div>
							<div class="layui-col-xs6 layui-col-md6">
								<div class="yzmt"><button class="layui-btn" lay-submit="" lay-filter="formDemo">立即登录</button></div>
							</div>
						</div>
									
					</form>
				</div>
			</div>
		</div>
	</div>
</div>
<script src="__PUBLIC__/admin/layui/layui.js"></script> 
<script>
//Demo
layui.use('form', function(){
  	var form = layui.form,jq=layui.$;
  
	form.on('submit(formDemo)', function(data){
		loading = layer.load(2, {
			shade: [0.2,'#000']
		});
		var param = data.field;
		jq.post("{:url('login/login')}",param,function(data){
			//console.log(data);
			if(data.code == 1){
				layer.close(loading);
				location.href=data.url;
				//layer.msg(data.msg, {icon: 1, time: 1000}, function(){
					//location.reload();
				//	location.href=data.url;
				//});
			}else{
				layer.close(loading);
				layer.msg(data.msg, {icon: 2, anim: 6, time: 1000});
				jq(".yzm").click();
			}
		});
		
	return false;
	});
  
  
});
</script>
</body>
</html>